Optimal. Leaf size=57 \[ -\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x}-\frac {\sin \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {4573}
\begin {gather*} -\frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )}-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4573
Rubi steps
\begin {align*} \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x}-\frac {\sin \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 40, normalized size = 0.70 \begin {gather*} -\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )+\sin \left (a+b \log \left (c x^n\right )\right )}{x+b^2 n^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 209 vs.
\(2 (57) = 114\).
time = 0.30, size = 209, normalized size = 3.67 \begin {gather*} -\frac {{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \cos \left (b \log \left (c\right )\right )\right )} n + \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + \sin \left (b \log \left (c\right )\right )\right )} \cos \left (b \log \left (x^{n}\right ) + a\right ) - {\left ({\left (b \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \sin \left (b \log \left (c\right )\right )\right )} n - \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) - \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) - \cos \left (b \log \left (c\right )\right )\right )} \sin \left (b \log \left (x^{n}\right ) + a\right )}{2 \, {\left ({\left (b^{2} \cos \left (b \log \left (c\right )\right )^{2} + b^{2} \sin \left (b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (b \log \left (c\right )\right )^{2} + \sin \left (b \log \left (c\right )\right )^{2}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.45, size = 44, normalized size = 0.77 \begin {gather*} -\frac {b n \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{{\left (b^{2} n^{2} + 1\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 1.29, size = 192, normalized size = 3.37 \begin {gather*} \begin {cases} - \frac {\sin {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 x} + \frac {\log {\left (c x^{n} \right )} \sin {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x} - \frac {i \log {\left (c x^{n} \right )} \cos {\left (a - \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x} & \text {for}\: b = - \frac {i}{n} \\\frac {i \cos {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 x} + \frac {\log {\left (c x^{n} \right )} \sin {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x} + \frac {i \log {\left (c x^{n} \right )} \cos {\left (a + \frac {i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x} & \text {for}\: b = \frac {i}{n} \\- \frac {b n \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} x + x} - \frac {\sin {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} x + x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sin \left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________